<h1>Semaphor Reports</h1>

<h3>Database Status</h3>
<table>
    <thead>
        <tr>
            <th>Rows</th>
            <th>Size</th>
            <th>Start</th>
            <th>End</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><%= number_with_delimiter @table_info['Rows'] %></td>
            <td><%= number_to_human_size @table_info['Data_length'] %></td>
            <td><%= @start_date.to_time.to_formatted_s(:long) %></td>
            <td><%= @end_date.to_time.to_formatted_s(:long) %></td>
        </tr>
    </tbody>
</table>

<% Semaphor::ReportRegistry.each_key do |category| -%>
<h3><%= category %> Reports</h3>
<p>
    <ul>
        <% Semaphor::ReportRegistry[category].each do |report| -%>
            <li><%= report_link(report.constantize) %></li>
        <% end -%>
    </ul>
</p>
<%- end %>
